﻿/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

.image.video-placeholder {
    display: inline-block;
    position: relative;
    text-decoration: none;
    &:before {
        background: url(../Magento_ProductVideo/images/gallery-sprite.png) no-repeat left bottom;
        content: '';
        height: 49px;
        left: 50%;
        margin-left: -24px;
        opacity: 0.7;
        position: absolute;
        top: 18px;
        width: 49px;
        z-index: 1;
    }
    .image-placeholder-text {
        font-weight: 400;
    }
}

//re-arrange checkboxes fields in slideout video panel (base, small image etc)
.admin__field {
    &.field-video_image,
    &.field-video_small_image,
    &.field-video_thumbnail,
    &.field-video_swatch_image,
    &.field-new_video_disabled {
        .admin__field-control {
            #mix-grid .column(3, @field-grid__columns);
            float: left;
            margin-left: 80px;
            position: relative;
            input {
                float: right;
            }
        }
        .admin__field-label {
            left: 0;
            margin-left: 35%;
            padding-left: 45px;
            position: absolute;
            width: 250px;
            &:before {
                content: none;
            }
            span {
                float: left;
            }
        }
    }
    &.field-new_video_disabled {
        margin-top: 32px;
    }
    &.field.field-new_video_screenshot {
        margin-bottom: 5px;
    }
    &.field.field-new_video_screenshot_preview {
        margin-bottom: 50px;
    }
    &.field-roleLabel {
        height: 0;
        .admin__field-control {
            #mix-grid .column(3, @field-grid__columns);
            float: left;
            margin-left: 80px;
            position: relative;
            .control-value {
                color: @color-black;
                font-family: 'Open Sans', @font-family__sans-serif;
                font-size: @font-size__s + 0.2;
                font-weight: @font-weight__semibold;
                float: right;
                position: relative;
                right: 50px;
                top: 21px;
            }
        }
    }
}

.admin__scope-old {
    .fieldset .admin__field {
        &.field-video_image,
        &.field-video_small_image,
        &.field-video_thumbnail,
        &.field-video_swatch_image {
            margin-bottom: 20px;
        }
    }
    .gallery .image .action-make-base,
    .images .image .action-make-base {
        .lib-button(
            @_button-background: transparent,
            @_button-border: none,
            @_button-background-hover: transparent,
            @_button-border-hover: none,
            @_button-background-active: transparent,
            @_button-border-active: none,
            @_button-font-content: '\e63b',
            @_button-icon-use: true,
            @_button-icon-font: 'Admin Icons',
            @_button-icon-font-text-hide: true,
            @_button-icon-font-size: @font-size__xl,
            @_button-icon-font-color: @color-gray62,
            @_button-icon-font-color-hover: @color-gray52,
            @_button-icon-font-color-active: @color-gray52,
            @_button-margin: 0
        );
        bottom: 9px;
        left: auto;
        position: absolute;
        right: 9px;
        width: 0 !important;
        &:before {
            left: 16px;
            position: absolute;
            top: -2px;
        }
    }
    .base-image .image-label {
        display: block;
    }
}

.preview_hidden_image_input_button {
    display: none;
}

.video-item {
    position: relative;
    &:after {
        background: url(../Magento_ProductVideo/images/gallery-sprite.png) bottom left;
        bottom: 0;
        content: '';
        height: 40px;
        left: 0;
        margin: auto;
        position: absolute;
        right: 0;
        top: 10px;
        width: 49px;
        z-index: 3;
    }
}

//style slideout panel add video
.mage-new-video-dialog {
    form.admin__scope-old {
        float: left;
        width: 65%;
    }
    .video-player-sidebar {
        width: 34.99999%;
        float: left;
    }
    .video-player-container {
        width: 100%;
        height: 20vw;
        margin-bottom: 30px;
        border: 1px solid #e3e3e3;
        position: relative;
        &:after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            margin: auto;
            width: 93px;
            height: 60px;
            background: url(../Magento_ProductVideo/images/camera.png) no-repeat center;
            z-index: 1;
        }
    }
    .video-information {
        margin-bottom: 7px;
        display: none;
        &:after {
            content: "";
            visibility: hidden;
            display: block;
            height: 0;
            clear: both;
        }
        label {
            font-family: 'Open Sans', @font-family__sans-serif;
            font-size: @font-size__s + 0.2;
            font-weight: @font-weight__semibold;
            display: block;
            width: 25%;
            float: left;
            text-align: right;
        }
        span {
            font-family: 'Open Sans', @font-family__sans-serif;
            font-size: @font-size__s + 0.2;
            font-weight: @font-weight__light;
            display: block;
            width: 74.9999%;
            float: left;
            padding-left: 20px;
        }
    }
    .product-video {
        width: 100%;
        z-index: 20;
        height: 100%;
        position: relative;
    }
}

.image.video-placeholder > button[data-role="add-video-button"],
.image.video-placeholder > button {
    background: transparent;
    border: 0;
    height: 100%;
    position: relative;
    width: 100%;
    z-index: 10;
}

.add-video-button-container {
    float: right;
    margin-bottom: 10px;
}

.image.base-image:hover .image-label {
    display: none;
}

.image-upload-error {
    background: #F9E1E1;
    color: @color-gray19;
    font-size: 12px;
    font-weight: 400;
    padding: 7px 7px 7px 35px;
    position: relative;
    .image-upload-error-cross {
        position: absolute;
        left: 8px;
        top: 9px;
        width: 20px;
        height: 20px;
        &:before,
        &:after {
            position: absolute;
            left: 8px;
            content: ' ';
            height: 20px;
            width: 4px;
            background-color: @color-red9;
        }
        &:before {
            transform: rotate(45deg);
        }
        &:after {
            transform: rotate(-45deg);
        }
    }
}
